<template>
  <div class="con">
    <div class="item" v-for="item in arr" :key="item.id">
      <img :src="item.img" alt />
      <div>{{item.name}}</div>
      <div class="price">{{ item.price.toFixed(2) }}</div>
    </div>
  </div>
</template>

<script>
export default {
    props:["arr"]
};
</script>

<style>
.con {
  overflow: hidden;
}
.item {
  float: left;
  padding: 10px;
  margin: 10px;
  background: #ccc;
  width: 150px;
  height: 200px;
}
.item img {
  width: 150px;
  height: 150px;
}
.item .price {
  color: #ff4400;
}
</style>